/*
package com.shiyi.core.vo;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

*/
/**
 * <p>
 * 
 * </p>
 *
 * @author shiyi
 * @since 2020-11-19
 *//*

public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    */
/**
     * 主键
     *//*

    private Integer id;


    */
/**
     * 用户名称
     *//*

    private String realName;

    */
/**
     * 用户编码
     *//*

    private String userName;

    */
/**
     * 用户密码
     *//*

    private String password;

    */
/**
     * 电话
     *//*

    private String phone;

    */
/**
     * 创建时间
     *//*

    private Date createTime;

    */
/**
     * 修改时间
     *//*

    private Date updateTime;

    private Integer isDelete;

    */
/*角色*//*

    private List<Role> roleList;

    */
/*菜单*//*

    private List<Menu> menuList;

    public User() {
    }

    public User(Integer id, String password, String userName, List<Role> roleList, List<Menu> menuList) {
        this.id = id;
        this.password = password;
        this.userName = userName;
        this.roleList = roleList;
        this.menuList = menuList;
    }

    public List<Menu> getMenuList() {
        return menuList;
    }

    public void setMenuList(List<Menu> menuList) {
        this.menuList = menuList;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    private List<GrantedAuthority> authorities;

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    public void setAuthorities(List<GrantedAuthority> authorities) {
        this.authorities = authorities;
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        List<GrantedAuthority> authorities = new ArrayList<>();
        for(int i = 0 ; i < roleList.size(); i++){
            authorities.add(new SimpleGrantedAuthority(roleList.get(i).getRoleCode()));
        }

        return authorities;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public String getUsername() {
        return this.userName;
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", realName='" + realName + '\'' +
                ", userName='" + userName + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", isDelete=" + isDelete +
                ", roleList=" + roleList +
                ", menuList=" + menuList +
                ", authorities=" + authorities +
                '}';
    }

    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }
}
*/
